<!--
 * @Date: 2020-07-13 09:03:26
 * @LastEditors: leehave
 * @LastEditTime: 2020-09-01 15:41:07
-->
<template>
	<div class="common-record--item">
		<div class="flex-item"  @click="handleGetId(item)">
			<div class="list">
				<div class="label bold" v-if="type == 'charge'">
					<van-icon name="" size="20px" /> {{item.address}}
				</div>
				<div class="label bold" v-if="type == 'balance'">
					<van-icon name="" size="20px" /> 充值账户
				</div>
				<div class="value right-num">{{item.money}}</div>
			</div>
			<div class="list">
				<div class="label">{{item.label}}</div>
				<div class="value">{{item.value}}</div>
			</div>
		</div>
		<div class="list-footer">
			<div class="list">
				<div class="label">{{item.state_label}}</div>
				<div class="value">{{item.state}}</div>
			</div>
		</div>
	</div>
</template>

<script>
export default {
    props: {
      item: {
        type: Object,
        default: {}
      },
      type: {
        type: String,
        default: 'charge'
      }
    },
    data() {
        return {

        };
    },
    computed: {

    },
    created() {

    },
    mounted() {

    },
    watch: {

    },
    methods: {
      handleGetId(item){
        this.type == 'charge' ? this.$router.push({
          path: `/user/charge/detail`,
          query:{
            id: item.id,
            name: item.address
          }
        }) : this.$router.push({
          path: `/user/balance/detail`,
          query:{
            id: item.id,
            name: item.address
          }
        })
      }
    },
    components: {

    },
};
</script>

<style scoped lang="less">

</style>
